import codecs

def remove_zero_width_chars(file_path):
    with codecs.open(file_path, 'r', 'utf-8') as f:
        content = f.read()
    
    # 移除零宽字符\uFEFF
    cleaned_content = content.replace('\uFEFF', '')
    
    with codecs.open(file_path, 'w', 'utf-8') as f:
        f.write(cleaned_content)
    
    print(f"✅ 已成功移除文件中的零宽字符: {file_path}")

if __name__ == '__main__':
    remove_zero_width_chars('repos.conf')